package com.mall.book.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.book.entity.po.OrderInfo;
import com.mall.book.mappers.OrderInfoMapper;
import com.mall.book.service.OrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * Created by Dizziness on 2022/3/22 20:12
 */
@Service
public class OrderInfoServiceImpl implements OrderInfoService {
    @Autowired
    OrderInfoMapper orderInfoMapper;

    @Override
    public boolean saveBatch(Collection<OrderInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdateBatch(Collection<OrderInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean updateBatchById(Collection<OrderInfo> entityList, int batchSize) {
        return false;
    }

    @Override
    public boolean saveOrUpdate(OrderInfo entity) {
        return false;
    }

    @Override
    public OrderInfo getOne(Wrapper<OrderInfo> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    public Map<String, Object> getMap(Wrapper<OrderInfo> queryWrapper) {
        return null;
    }

    @Override
    public <V> V getObj(Wrapper<OrderInfo> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    public BaseMapper<OrderInfo> getBaseMapper() {
        return orderInfoMapper;
    }

    @Override
    public Class<OrderInfo> getEntityClass() {
        return OrderInfo.class;
    }

    @Override
    public List<OrderInfo> getByMap(HashMap<String, Object> queryMap) {
        return orderInfoMapper.selectByMap(queryMap);
    }

    @Override
    public Collection<OrderInfo> getPageEvenDeleted(Map<String, String> selector, long current, long size) {
        return orderInfoMapper.selectPageEvenDeleted(selector, current-1, size);
    }

    @Override
    public int getTotal() {
        return orderInfoMapper.selectTotal();
    }

    @Override
    public OrderInfo getOneEvenDeleted(String id) {
        return orderInfoMapper.selectOneEvenDeleted(id);
    }

    @Override
    public List<OrderInfo> getUserOrdersEvenDeleted(String user_account) {
        return orderInfoMapper.selectUserOrdersEvenDeleted(user_account);
    }
}
